import 'package:built_collection/built_collection.dart';
import 'package:backend.core/core/domain/entities/google_play/google_play_purchased_item_info.dart';

abstract class GooglePlayPurchasedItemInfoRepository {
  Future<void> upsertPurchasedItemInfo({
    required GooglePlayPurchasedItemInfo purchasedItemInfo,
  });

  Future<GooglePlayPurchasedItemInfo?> findPurchasedItemInfoByToken({
    required String purchaseToken,
  });

  Future<BuiltList<GooglePlayPurchasedItemInfo?>> findPurchasedItemInfosByTokens({
    required BuiltList<String> purchaseTokens,
  });

  Future<BuiltList<GooglePlayPurchasedItemInfo>> findUserPurchasedItemInfos({
    required String googlePlayUserId,
  });

  Future<void> upsertPurchasedItemInfos({
    required BuiltList<GooglePlayPurchasedItemInfo> purchasedItemInfos,
  });

  Future<BuiltList<GooglePlayPurchasedItemInfo>> findAllPurchasedItemInfos();
}
